#include <iostream>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

const char *filepath = "/dev/pts/6";

void OpenTerminal()
{
    int fd = open(filepath, O_WRONLY);
    if(fd < 0)
    {
        perror("main::open");
        exit(0);
    }
    dup2(fd, 2);
    // printf("hello world\n");

    close(fd);
}